<template>
  <div id="myResumeAdd" class="person-detail">
    <div>
      <van-nav-bar
        title="我的简历"
        right-text="编辑"
        :fixed="true"
        left-arrow
        @click-left="back"
        @click-right="operate"
      />
    </div>
    <div class="myResumeAdd-body">
      <div>
        <div>
          <div style="display:flex;">
            <div class="myResumeAdd-first">
              <p>{{resume.username}}</p>
              <p>
                <svg-icon
                  icon-class="我的简历-电话"
                  widthW="0.3rem"
                  heightH="0.3rem"
                ></svg-icon>
                {{resume.phone}}
              </p>
            </div>
            <div class="myResumeAdd-img">
              <van-image
                width="60"
                height="60"
                :src="resume.headImage"
                round
              />
            </div>
          </div>
          <div class="line-myResumeAdd"></div>
          <div class="myResumeAdd-second">
            <p>{{resume.curStatus == 1 ? '在职-考虑机会':resume.curStatus == 2 ? '离职-正在找工作':''}}</p>
            <p>{{resume.age}}岁 | {{resume.degree == 1 ?'博士' : resume.degree == 2 ? '硕士' : 
                resume.degree == 3 ? '本科': resume.degree == 4 ? '高中' : resume.degree == 5 ?"初中":
                resume.degree == 6 ?"小学":''}} | {{resume.postName}}</p>
            <p>身份证号：{{resume.idcardNo}}</p>
            <p>户籍所在地：{{resume.address}}</p>
            <p>详细户籍地址：{{resume.rregionName}}</p>
            <p>就业地区：{{resume.eregionName}}</p>
          </div>
        </div>
      </div>
      <div class="myResumeAdd-exprience">
        <p class="myResumeAdd-big">工作经历</p>
        <p>
          <!-- 中电兴发软件研发（北京）有限公司 -->
        </p>
        <p>
          <!-- 2018.05-至今 -->
        </p>
        <p>
          {{resume.experience}}
        </p>
      </div>
      <div>
        <p class="myResumeAdd-big">自我介绍</p>
        <p class="myResumeAdd-introduce">
          {{resume.introduction}}
        </p>
      </div>
    </div>
  </div>
</template>
<script>
import mine from "../../../../controller/mine";
export default {
  name: "feedBack",
  components: {},
  data() {
    return {
      resume: ""
    };
  },
  computed: {},
  created() {},
  mounted() {
      this.getInfo()
  },
  methods: {
    operate(){
      this.$router.push({ path: '/work/myResume/addResume' }),
      sessionStorage.setItem('resumeInfo',JSON.stringify(this.resume))
    },
    getInfo() {
      let data = JSON.parse(localStorage["userInfo"]).currentUser.id;
      mine.training_resume_get(data).then(res => {
        if (res.code == "0") {
          this.resume = res.datas;
        } else {
          this.$toast(res.msg);
        }
      });
    },
    back() {
      this.$router.go(-1);
    }
  }
};
</script>
<style lang="scss" scoped>
#myResumeAdd {
  p {
    margin: 5px 0;
  }
  background: #fff;
  .myResumeAdd-body {
    padding: 20px;
  }
  .myResumeAdd-first {
    width: 70%;
    > p:nth-child(1) {
      font-size: 21px;
      font-weight: bold;
    }
    > p:nth-child(2) {
      margin-top: 10px;
      font-weight: 300;
      opacity: 0.7;
    }
  }
  .myResumeAdd-img {
    float: left;
  }
  .myResumeAdd-second {
    font-size: 14px;
    opacity: 0.7;
    > p {
      margin-top: 8px;
    }
    > p:nth-child(1) {
      opacity: 1;
    }
  }
  .myResumeAdd-big {
    font-size: 16px;
    font-weight: 700;
    padding: 20px 0 0 0;
  }
  .line-myResumeAdd {
    width: 98%;
    margin: auto;
    height: 0;
    border: none;
    border-top: 1px solid #e2e2e2;
    margin-top: 10px;
  }
  .myResumeAdd-exprience {
    > p:nth-child(2) {
      font-size: 14px;
      font-weight: 700;
      margin-top: 10px;
    }
    > p:nth-child(3),
    > p:nth-child(4) {
      opacity: 0.7;
    }
  }
  .myResumeAdd-introduce {
    opacity: 0.7;
  }
}
</style>
